--TEST--
US: City line parsing
--FILE--
<?php
/**
 * Checks city line detection and parsing
 *
 * PHP version 5
 *
 * @category Structures
 * @package  Structures_Location
 * @author   Philippe Jausions <Philippe.Jausions@11abacus.com>
 * @copyight 2008 by Philippe Jausions / 11abacus
 * @license  http://www.opensource.org/licenses/bsd-license.php New BSD License
 * @version  CVS: $Id:$
 * @link     http://pear.11abacus.com/package/Structures_Location
 */

/**
 * Required dependencies 
 */
require_once 'Structures/Location/US/Parser.php';

/**
 * Main
 */

// Include data
require 'US_Addresses.inc';

$parser = new Structures_Location_US_Parser();

foreach ($addresses as $id => $address) {
    echo $id.': ';
    try {
        $location = $parser->parse($address);
        echo $location->getLocality().'  ||  '.$location->getRegionCode()
             .'  ||  '.$location->getPostalCode();
    } catch (Exception $e) {
        echo $e->getMessage();
    }
    echo "\n";
}

?>
--EXPECT--
0: Towneville  ||  DC  ||  12456
1: Tooncity  ||  AK  ||  05896-0001
2: Old Towne  ||  CA  ||  12456
3: MYOB  ||  NC  ||  87541-4521
4: SEACOAST  ||  WY  ||  58741
5: Intercourse  ||  PA  ||  09542-0085
6: Prestante  ||  IL  ||  04125
7: Towneville  ||  NY  ||  12456
8: The address passed could not be parsed for location information
